package com.example.xinhuazidian.base

import com.example.xinhuazidian.bean.LatestBean

class AboutPrensenter(baseView: AboutView?) : BasePresenter<AboutView?>(baseView) {
    /**
     * 检测版本更新
     */
    fun latest(id: String?, api_token: String?) {
        addDisposable(apiServer.latest(id, api_token), object : BaseObserver<LatestBean?>() {
            override fun onSuccess(o: LatestBean?) {
                baseView!!.latestData(o)
            }

            override fun onError(msg: String?) {
                baseView!!.onError(msg)
            }
        })
    }
}